<template>
  <div>
    <van-nav-bar title="搜索结果" left-arrow @click-left="$router.back()" />
    <van-cell v-for="item in ssjl" :key="item.art_id" :title="item.title" @click="$router.push({path:'/article',query:{id:item.art_id}})">
      <!-- 使用 title 插槽来自定义标题 -->
      <template #label>
        <van-grid :border="false" :column-num="item.cover.type">
          <van-grid-item v-for="(img,index) in item.cover.images" :key='index'>
            <van-image :src="img" />
          </van-grid-item>
        </van-grid>
      </template>
    </van-cell>
  </div>
</template>

<script>
import { sousjg} from "./home.js";
export default {
  name: "searchjg",
  data() {
    return {
      ssjl: [],
    };
  },
  async created() {
    let res = await sousjg(this.$route.query.sea);
    console.log(res);
    this.ssjl = res.data.data.results;
  },
};
</script>

<style>
</style>